<ul class="admin-list-image">
    <? foreach ($products as $product): ?>
    <?php
        $productId = $product['Product']['id'];
        $groupId   = $product['Group']['id'];
    ?>
    <li>
        <h2><?= $product['Product']['name'] ?></h2>
        <?= $this->Html->image('products/' . $product['Group']['id'] . '/' .$product['Product']['image'].'?h=150') ?>
        
        <div class="actions">
            <?= $this->Html->link('izmeni', 'javascript:void(0)', array(
                'onclick' => "editProduct({$productId})",
                'title'   => 'Izmeni proizvod',
                'class'   => 'edit'
            )) ?>
            <?= $this->Html->link('obriši', 'javascript:void(0)', array(
                'onclick' => "remoteDelete('/admin_proizvodi/delete/{$productId}', '{$groupId}', productDeleted)",
                'class'   => 'delete',
                'title'   => 'Obriši proizvod'
            )) ?>
        </div>
    </li>
    <? endforeach ?>
</ul>
